//
//  HomeViewFlowLayout.h
//  W2MD
//
//  Created by zhudongwei on 14-9-22.
//  Copyright (c) 2014年 zhudongwei. All rights reserved.
//

#import <UIKit/UIKit.h>

@class HomeViewFlowLayout;

@protocol HomeViewWaterfallCollectionViewDelegate <UICollectionViewDelegate>

- (CGFloat)collectionView:(UICollectionView *)collectionView
                   layout:(HomeViewFlowLayout *)collectionViewLayout
 heightForItemAtIndexPath:(NSIndexPath *)indexPath;

@optional

- (CGFloat) collectionView:(UICollectionView *)collectionView
                    layout:(HomeViewFlowLayout *)collectionViewLayout
heightForHeaderAtIndexPath:(NSIndexPath *)indexPath;

@end


@interface HomeViewFlowLayout : UICollectionViewFlowLayout
@property (nonatomic, weak) IBOutlet id<HomeViewWaterfallCollectionViewDelegate> delegate;
@property (nonatomic) CGFloat itemWidth;

@property (nonatomic) CGFloat topInset;
@property (nonatomic) CGFloat bottomInset;
@property (nonatomic) BOOL stickyHeader;
@end
